package tournoidefoot.modele;

import java.io.Serializable;
import java.util.Collection;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import static javax.persistence.CascadeType.ALL;

@Entity
public class Admin implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3251329314439649964L;
	private String login;
	private String password;
	private Collection <Tournoi> listeTournoi;
	@Id
	public String getLogin() {
		return login;
	}
	public void setLogin(String login) {
		this.login = login;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	@OneToMany(cascade = ALL, mappedBy = "admin")
	public Collection <Tournoi> getListeTournoi() {
		return listeTournoi;
	}
	public void setListeTournoi(Collection<Tournoi> listeTournoi) {
		this.listeTournoi = listeTournoi;
	}

}
